//
//  WPSystemRecommendedVC.m
//  wobingwoyi
//
//  Created by WGP on 16/9/18.
//  Copyright © 2016年 WGP. All rights reserved.
//

#import "WPSystemRecommendedVC.h"

@interface WPSystemRecommendedVC ()

@property(nonatomic,strong)UITableView *tableView;
@property(nonatomic,strong)UIView *noInfoView;

@end
@implementation WPSystemRecommendedVC

-(void)viewDidLoad
{
    [super viewDidLoad];
    
    self.titleLabel.text = @"系统消息";
    
    [self noInfoView];
    [self tableView];
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.tableView.hidden = YES;
}

-(UITableView *)tableView
{
    if (_tableView == nil)
    {
        _tableView = [[UITableView alloc] initWithFrame:self.noInfoView.bounds];
        _tableView.backgroundColor = [UIColor redColor];
        [self.view addSubview:_tableView];
    }
    return _tableView;
}

-(UIView *)noInfoView
{
    if (_noInfoView == nil)
    {
        _noInfoView = [[UIView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT-64)];
        _noInfoView.backgroundColor = GlobalBgColor;
        [self.view addSubview:_noInfoView];
        
        UIImageView *iconView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"collection_record"]];
        [iconView sizeToFit];
        [_noInfoView addSubview:iconView];
        
        [iconView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(_noInfoView);
            make.top.equalTo(_noInfoView).offset(124*K_SCALE_ELSE_TABBAR);
        }];
        
        UILabel *label = [UILabel new];
        label.text  =@"暂无系统消息";
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = GloballightFontColor;
        [_noInfoView addSubview:label];
        
        [label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(_noInfoView);
            make.top.equalTo(iconView.mas_bottom).offset(35*K_SCALE_ELSE_TABBAR);
        }];
        
    }
    return _noInfoView;
}


@end
